projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51971d5
)
gtktextview: Fix a definite use of an uninitialised variable
author
Philip Withnall
<philip.withnall@collabora.co.uk>
Wed, 20 Nov 2013 17:33:59 +0000
(17:33 +0000)
committer
Philip Withnall
<philip.withnall@collabora.co.uk>
Mon, 9 Mar 2015 13:41:37 +0000
(13:41 +0000)
This seems to have been a typo in the original code, and allowed access
to virtual_cursor_y when it was uninitialised.
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
gtk/gtktextview.c
patch
|
blob
|
history
diff --git
a/gtk/gtktextview.c
b/gtk/gtktextview.c
index a61dd1ed5ec19f5c2ceb005d1748f1af9b8e15b5..13bade8b85f0b396227e8bb03d1c4e03117cc72c 100644
(file)
--- a/
gtk/gtktextview.c
+++ b/
gtk/gtktextview.c
@@
-8787,7
+8787,7
@@
gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view,
if (y)
{
- if (priv->virtual_cursor_
x
!= -1)
+ if (priv->virtual_cursor_
y
!= -1)
*y = priv->virtual_cursor_y;
else
*y = pos.y + pos.height / 2;